<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title></title>
		<link href="css/index.css" rel="stylesheet" />
	</head>
	<body>
	<div class="wrapinvoiceDetiles">
		<div class="headTitle">
		<img onclick="goback()" src="./img/leftArrow.jpg" />
		<p>电子发票详情</p>
       	</div>
		<div class="divTop">
			<p class="pTop">
				<span class="spanTopL">市民卡充值</span>
				<span class="spanTopR">已开票</span>
			</p>
			<p class="pBottom">
				<span class="spanBottomL ">{{rec_time}}</span>
				<span class="spanBottomR" >查看></span>
			</p>
		</div>
		<span class="spanText">
			发票信息
		</span>
		<ul>
			<li><span>发票抬头</span><small class="cardName"></small></li>
			<li class="isPerson nsr_code"><span>纳税人识别号</span><small></small></li>
			<li><span>发票内容</span><small>市民卡充值</small></li>
			<li><span>发票金额</span><small class="money">元</small></li>
			<li><span>申请时间</span><small class="apply_date"></small></li>
			<li class="isPerson address"><span>地址</span><small></small></li>
			<li class="isPerson phone"><span>电话</span><small></small></li>
			<li class="isPerson khh"><span>开户行</span><small></small></li>
			<li class="isPerson zh"><span>账号</span><small></small></li>
			<li class='rec_content'><span>备注说明</span><small class="remark"></small></li>
		</ul>
		<span class="spanText">
			接收信息
		</span>
		<p class="pmail"><span>电子邮箱</span><small class="email"></small></p>
		<span class="orderInfo" >订单信息(个订单)</span>
		<button class="retransmission">重发电子发票</button>
	</div>
</body>
</html>
<script src="js/jquery.min.js"></script>
<script src="js/oldPublic.js"></script>
<script>
	
	var detialItem = window.location.href.split('?')[1].split('=')[1];
	detialItem = decodeURI(detialItem);
	detialItem = JSON.parse(detialItem);
	console.log(detialItem);
	var count = detialItem.count;
	var name = detialItem.name;//抬头
	var apply_date  = detialItem.apply_date;//申请日期
	var money = detialItem.sum_amt;//金额
	var remark = detialItem.remark;//备注
	var email  =detialItem.email;//邮箱
	var nsr_code = detialItem.taxpayer_num;//识别号
	var address = detialItem.adress;//地址
	var telphone_no = detialItem.telphone_no;//电话
	var khh = detialItem.open_bank_name;//开户行
	var zh = detialItem.acct_no;//账号
	var apply_seqno = detialItem.apply_seqno;
	var invoice_code = detialItem.invoice_code;
	var invoice_date = detialItem.invoice_date;
	var invoice_no = detialItem.invoice_no;
	var sum_amt = detialItem.sum_amt;
	if(!nsr_code){
		$('.nsr_code').hide();
	}
	if(!address){
		$('.address').hide();
	}
	if(!telphone_no){
		$('.phone').hide();
	}
	if(!khh){
		$('.khh').hide();
	}
	if(!zh){
		$('.zh').hide();
	}
	if(!remark){
		$('.rec_content').hide();
	}
	$('.spanTopL').html(name);
	$('.cardName').html(name);
	$('.money').html(money+'元');
	$('.apply_date').html(apply_date);
	$('.spanBottomL').html(invoice_date);
	$('.remark').html(remark);//备注
	$('.email').html(email);//邮箱
	$('.nsr_code small').html(nsr_code);//识别号
	$('.address small').html(address);//地址
	$('.phone small').html(telphone_no);//电话
	$('.khh small').html(khh);//开户行
	$('.zh small').html(zh);//账号
	
	$('.orderInfo').html('订单信息('+count+'个订单)');
	$('.orderInfo').click(function(){
		window.location.href = './contain.html?apply_seqno='+apply_seqno;
	})
	
	$('.retransmission').click(function(){
		window.location.href = './reSend.html?email='+email+'&apply_seqno='+apply_seqno;
	})
	$('.spanBottomR').click(function(){
		window.location.href='./lookTicket.html?invoice_code='+invoice_code+'&invoice_date='+invoice_date+'&invoice_no='+invoice_no+'&sum_amt='+sum_amt;
	})
	
</script>


